﻿@model BussinessLogic.Models.Study.StudyCreateModel
@{
    ViewBag.Title = "Edit";
}
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

<script src="../../Scripts/kendo/2012.1.322/kendo.web.min.js" type="text/javascript"></script>
<script src="../../Scripts/kendo/2012.1.322/kendo.editor.min.js" type="text/javascript"></script>
<link href="../../Content/kendo/2012.1.322/kendo.common.min.css" rel="stylesheet"
    type="text/css" />
<link href="../../Content/kendo/2012.1.322/kendo.default.min.css" rel="stylesheet"
    type="text/css" />

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Edit study</legend>
        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Description)
        </div>
        <textarea id="Description" name="Description" rows="10" cols="30" style="width:740px;height:440px">
        @Html.Raw(Model.Description)
        </textarea>
        <div class="editor-label">
            @Html.LabelFor(model => model.InformedConsent)
        </div>
        <textarea id="InformedConsent" name="InformedConsent" rows="10" cols="30" style="width:740px;height:440px">
      @Html.Raw(Model.InformedConsent)
        </textarea>
        <div class="editor-label">
            @Html.LabelFor(model => model.Active)
        </div>
        <div class="editor-field">
            @Html.CheckBoxFor(model => model.Active)
            @Html.ValidationMessageFor(model => model.Active)
        </div>
        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}
<div>
    @Html.ActionLink("Back to List", "Index")
</div>



<script type="text/javascript">

    $(document).ready(function () {
        $("#Description").kendoEditor();
        $("#InformedConsent").kendoEditor();
    });

</script>
